﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_RptDoiChieuCongNoPhaiTra : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvKhachHang")]
        private ADVObjects _AdvKhachHang;
        [AccessedThroughProperty("AdvTaiKhoan")]
        private ADVAccount _AdvTaiKhoan;
        [AccessedThroughProperty("CboDonVi")]
        private ComboBox _CboDonVi;
        [AccessedThroughProperty("CboMauBaoCao")]
        private ComboBox _CboMauBaoCao;
        [AccessedThroughProperty("CmdCancel")]
        private Button _CmdCancel;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label16")]
        private Label _Label16;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("OptInChungTu")]
        private RadioButton _OptInChungTu;
        [AccessedThroughProperty("OptInHoaDon")]
        private RadioButton _OptInHoaDon;
        [AccessedThroughProperty("TxtDenNgay")]
        private DateTimePicker _TxtDenNgay;
        [AccessedThroughProperty("TxtDienThoai")]
        private TextBox _TxtDienThoai;
        [AccessedThroughProperty("TxtFax")]
        private TextBox _TxtFax;
        [AccessedThroughProperty("TxtNguoiNhan")]
        private TextBox _TxtNguoiNhan;
        [AccessedThroughProperty("TxtTuNgay")]
        private DateTimePicker _TxtTuNgay;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;

        [DebuggerNonUserCode]
        public Frm_RptDoiChieuCongNoPhaiTra()
        {
            base.Load += new EventHandler(this.Frm_RptDoiChieuCongNoPhaiThu_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.InitializeComponent();
        }

        private void AdvKhachHang_ValueChanged(object sender, EventArgs e)
        {
            this.TxtNguoiNhan.Text = "";
            this.TxtDienThoai.Text = "";
            this.TxtFax.Text = "";
            if (LVYModule.ReturnIfNull(this.AdvKhachHang.Value, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                clsDMDoiTuong tuong = new clsDMDoiTuong();
                tuong.Load(this.AdvKhachHang.Value);
                this.TxtDienThoai.Text = tuong.DienThoai;
                this.TxtFax.Text = tuong.Fax;
            }
        }

        private void CmdCancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.AdvTaiKhoan.Value, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nh\x00e2̣p s\x00f4́ tài khoản!", ""));
                this.AdvTaiKhoan.Focus();
            }
            else if (LVYModule.ReturnIfNull(this.AdvKhachHang.Value, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nh\x00e2̣p khách hàng!", ""));
                this.AdvKhachHang.Focus();
            }
            else
            {
                switch (this.CboMauBaoCao.SelectedIndex)
                {
                    case 0:
                        this.PrintReportMau1();
                        break;

                    case 1:
                        this.PrintReportMau2();
                        break;

                    case 2:
                        this.PrintReportMau3();
                        break;
                }
            }
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_RptDoiChieuCongNoPhaiThu_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.TxtTuNgay.Text = "01/" + LVYModule.sRight("00" + Conversions.ToString(DateAndTime.Month(DateAndTime.Today)), 2) + "/" + Conversions.ToString(DateAndTime.Year(DateAndTime.Today));
                this.TxtDenNgay.Text = Strings.Format(DateAndTime.Today, "dd/MM/yyyy");
                BuildComboModule.BuildCombo(this.CboDonVi, modGeneral.ListDanhMuc.DonVi, true, "", "");
                this.CboDonVi.SelectedValue = modGeneral.H_CLIENT;
                this.AdvTaiKhoan.SetDefault();
                this.CboMauBaoCao.Items.Clear();
                this.CboMauBaoCao.Items.Add(modGeneral.Tranlated("Mẫu số 1", ""));
                this.CboMauBaoCao.Items.Add(modGeneral.Tranlated("Mẫu số 2", ""));
                this.CboMauBaoCao.Items.Add(modGeneral.Tranlated("Mẫu số 3", ""));
                this.CboMauBaoCao.SelectedIndex = 0;
            }
        }

        public DataTable GetDataDoiChieu()
        {
            DataTable table;
            IDataParameter[] commandParameters = new IDataParameter[7];
            string str = "";
            if (this.OptInChungTu.Checked)
            {
                str = "CT";
            }
            else
            {
                str = "HD";
            }
            try
            {
                commandParameters[0] = DBHelper.createParameter("@KhoaDonVi", DbType.Int64, ParameterDirection.Input, RuntimeHelpers.GetObjectValue(this.CboDonVi.SelectedValue));
                commandParameters[1] = DBHelper.createParameter("@TuNgay", DbType.Int64, ParameterDirection.Input, LVYModule.Date2Char(this.TxtTuNgay.Text));
                commandParameters[2] = DBHelper.createParameter("@DenNgay", DbType.Int64, ParameterDirection.Input, LVYModule.Date2Char(this.TxtDenNgay.Text));
                commandParameters[3] = DBHelper.createParameter("@KhoaTaiKhoan", DbType.Int64, ParameterDirection.Input, this.AdvTaiKhoan.Value);
                commandParameters[4] = DBHelper.createParameter("@KhoaDoiTuong", DbType.Int64, ParameterDirection.Input, this.AdvKhachHang.Value);
                commandParameters[5] = DBHelper.createParameter("@LoaiBaoCao", DbType.Int64, ParameterDirection.Input, str);
                commandParameters[6] = DBHelper.createParameter("@Language", DbType.Int64, ParameterDirection.Input, modGeneral.H_LANGUAGE);
                table = DBHelper.ExecuteDataset(modGeneral.ConnectionString, CommandType.StoredProcedure, "MH_BC_DoiChieuCongNoPhaiTraChiTiet", commandParameters).Tables[0];
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                MessageBox.Show(exception.Message);
                table = null;
                ProjectData.ClearProjectError();
                return table;
                ProjectData.ClearProjectError();
            }
            return table;
        }

        public DataTable GetDataDoiChieuTongHop()
        {
            DataTable table;
            IDataParameter[] commandParameters = new IDataParameter[7];
            string str = "";
            if (this.OptInChungTu.Checked)
            {
                str = "CT";
            }
            else
            {
                str = "HD";
            }
            try
            {
                commandParameters[0] = DBHelper.createParameter("@KhoaDonVi", DbType.Int64, ParameterDirection.Input, RuntimeHelpers.GetObjectValue(this.CboDonVi.SelectedValue));
                commandParameters[1] = DBHelper.createParameter("@TuNgay", DbType.Int64, ParameterDirection.Input, LVYModule.Date2Char(this.TxtTuNgay.Text));
                commandParameters[2] = DBHelper.createParameter("@DenNgay", DbType.Int64, ParameterDirection.Input, LVYModule.Date2Char(this.TxtDenNgay.Text));
                commandParameters[3] = DBHelper.createParameter("@KhoaTaiKhoan", DbType.Int64, ParameterDirection.Input, this.AdvTaiKhoan.Value);
                commandParameters[4] = DBHelper.createParameter("@KhoaDoiTuong", DbType.Int64, ParameterDirection.Input, this.AdvKhachHang.Value);
                commandParameters[5] = DBHelper.createParameter("@LoaiBaoCao", DbType.Int64, ParameterDirection.Input, str);
                commandParameters[6] = DBHelper.createParameter("@Language", DbType.Int64, ParameterDirection.Input, modGeneral.H_LANGUAGE);
                table = DBHelper.ExecuteDataset(modGeneral.ConnectionString, CommandType.StoredProcedure, "MH_BC_DoiChieuCongNoTongHop", commandParameters).Tables[0];
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                MessageBox.Show(exception.Message);
                table = null;
                ProjectData.ClearProjectError();
                return table;
                ProjectData.ClearProjectError();
            }
            return table;
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_RptDoiChieuCongNoPhaiTra));
            this.OptInHoaDon = new RadioButton();
            this.OptInChungTu = new RadioButton();
            this.Label7 = new Label();
            this.CmdCancel = new Button();
            this.CboMauBaoCao = new ComboBox();
            this.Label6 = new Label();
            this.CmdOK = new Button();
            this.TxtFax = new TextBox();
            this.Label5 = new Label();
            this.TxtDienThoai = new TextBox();
            this.Label4 = new Label();
            this.TxtNguoiNhan = new TextBox();
            this.Label16 = new Label();
            this.GroupBox1 = new GroupBox();
            this.AdvKhachHang = new ADVObjects();
            this.CboDonVi = new ComboBox();
            this.Label1 = new Label();
            this.TxtDenNgay = new DateTimePicker();
            this.TxtTuNgay = new DateTimePicker();
            this.Label13 = new Label();
            this.Label2 = new Label();
            this.Label3 = new Label();
            this.AdvTaiKhoan = new ADVAccount();
            this.GroupBox1.SuspendLayout();
            this.SuspendLayout();
            this.OptInHoaDon.AutoSize = true;
            Point point = new Point(0x11f, 0xaf);
            this.OptInHoaDon.Location = point;
            this.OptInHoaDon.Name = "OptInHoaDon";
            Size size = new Size(0x73, 0x11);
            this.OptInHoaDon.Size = size;
            this.OptInHoaDon.TabIndex = 70;
            this.OptInHoaDon.Text = "In theo số h\x00f3a đơn";
            this.OptInHoaDon.UseVisualStyleBackColor = true;
            this.OptInChungTu.AutoSize = true;
            this.OptInChungTu.Checked = true;
            point = new Point(0x66, 0xaf);
            this.OptInChungTu.Location = point;
            this.OptInChungTu.Name = "OptInChungTu";
            size = new Size(0x75, 0x11);
            this.OptInChungTu.Size = size;
            this.OptInChungTu.TabIndex = 0x45;
            this.OptInChungTu.TabStop = true;
            this.OptInChungTu.Text = "In theo số chứng từ";
            this.OptInChungTu.UseVisualStyleBackColor = true;
            this.Label7.AutoSize = true;
            point = new Point(10, 0xc9);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(70, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 0x51;
            this.Label7.Text = "Mẫu b\x00e1o c\x00e1o";
            this.CmdCancel.DialogResult = DialogResult.Cancel;
            this.CmdCancel.Image = (Image) manager.GetObject("CmdCancel.Image");
            this.CmdCancel.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x162, 240);
            this.CmdCancel.Location = point;
            this.CmdCancel.Name = "CmdCancel";
            size = new Size(0x4f, 0x18);
            this.CmdCancel.Size = size;
            this.CmdCancel.TabIndex = 0x40;
            this.CmdCancel.Text = "&Tho\x00e1t";
            this.CmdCancel.UseVisualStyleBackColor = true;
            this.CboMauBaoCao.FormattingEnabled = true;
            point = new Point(0x66, 0xc6);
            this.CboMauBaoCao.Location = point;
            this.CboMauBaoCao.Name = "CboMauBaoCao";
            size = new Size(0x133, 0x15);
            this.CboMauBaoCao.Size = size;
            this.CboMauBaoCao.TabIndex = 0x47;
            this.Label6.AutoEllipsis = true;
            this.Label6.AutoSize = true;
            point = new Point(0xf3, 0x9b);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            this.Label6.RightToLeft = RightToLeft.No;
            size = new Size(0x18, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 0x4e;
            this.Label6.Text = "Fax";
            this.Label6.TextAlign = ContentAlignment.TopRight;
            this.CmdOK.Image = (Image) manager.GetObject("CmdOK.Image");
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x10f, 240);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x4e, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 0x3f;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            point = new Point(0x11f, 0x98);
            this.TxtFax.Location = point;
            this.TxtFax.Name = "TxtFax";
            size = new Size(0x7a, 20);
            this.TxtFax.Size = size;
            this.TxtFax.TabIndex = 0x44;
            this.Label5.AutoEllipsis = true;
            this.Label5.AutoSize = true;
            point = new Point(10, 0x9b);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            this.Label5.RightToLeft = RightToLeft.No;
            size = new Size(0x37, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0x4c;
            this.Label5.Text = "Điện thoại";
            this.Label5.TextAlign = ContentAlignment.TopRight;
            point = new Point(0x66, 0x98);
            this.TxtDienThoai.Location = point;
            this.TxtDienThoai.Name = "TxtDienThoai";
            size = new Size(0x7a, 20);
            this.TxtDienThoai.Size = size;
            this.TxtDienThoai.TabIndex = 0x43;
            this.Label4.AutoEllipsis = true;
            this.Label4.AutoSize = true;
            point = new Point(10, 0x81);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            this.Label4.RightToLeft = RightToLeft.No;
            size = new Size(0x3e, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0x4a;
            this.Label4.Text = "Người nhận";
            this.Label4.TextAlign = ContentAlignment.TopRight;
            point = new Point(0x66, 0x7e);
            this.TxtNguoiNhan.Location = point;
            this.TxtNguoiNhan.Name = "TxtNguoiNhan";
            size = new Size(0x133, 20);
            this.TxtNguoiNhan.Size = size;
            this.TxtNguoiNhan.TabIndex = 0x42;
            this.Label16.AutoEllipsis = true;
            this.Label16.AutoSize = true;
            point = new Point(10, 0x67);
            this.Label16.Location = point;
            this.Label16.Name = "Label16";
            this.Label16.RightToLeft = RightToLeft.No;
            size = new Size(0x4b, 13);
            this.Label16.Size = size;
            this.Label16.TabIndex = 0x47;
            this.Label16.Text = "Nh\x00e0 cung cấp";
            this.Label16.TextAlign = ContentAlignment.TopRight;
            this.GroupBox1.BackColor = Color.Transparent;
            this.GroupBox1.Controls.Add(this.CboMauBaoCao);
            this.GroupBox1.Controls.Add(this.Label7);
            this.GroupBox1.Controls.Add(this.OptInHoaDon);
            this.GroupBox1.Controls.Add(this.OptInChungTu);
            this.GroupBox1.Controls.Add(this.Label6);
            this.GroupBox1.Controls.Add(this.TxtFax);
            this.GroupBox1.Controls.Add(this.Label5);
            this.GroupBox1.Controls.Add(this.TxtDienThoai);
            this.GroupBox1.Controls.Add(this.Label4);
            this.GroupBox1.Controls.Add(this.TxtNguoiNhan);
            this.GroupBox1.Controls.Add(this.Label16);
            this.GroupBox1.Controls.Add(this.AdvKhachHang);
            this.GroupBox1.Controls.Add(this.CboDonVi);
            this.GroupBox1.Controls.Add(this.Label1);
            this.GroupBox1.Controls.Add(this.TxtDenNgay);
            this.GroupBox1.Controls.Add(this.TxtTuNgay);
            this.GroupBox1.Controls.Add(this.Label13);
            this.GroupBox1.Controls.Add(this.Label2);
            this.GroupBox1.Controls.Add(this.Label3);
            this.GroupBox1.Controls.Add(this.AdvTaiKhoan);
            point = new Point(6, 8);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            size = new Size(0x1aa, 0xe2);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 0x3e;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "T\x00f9y chọn";
            this.AdvKhachHang.Conditions = "";
            this.AdvKhachHang.LoaiDoiTuong = modGeneral.TypeObjects.NhaCungCap;
            point = new Point(0x66, 100);
            this.AdvKhachHang.Location = point;
            this.AdvKhachHang.Name = "AdvKhachHang";
            this.AdvKhachHang.ReadOnly = false;
            size = new Size(0x133, 20);
            this.AdvKhachHang.Size = size;
            this.AdvKhachHang.TabIndex = 0x41;
            this.AdvKhachHang.UpperText = true;
            this.AdvKhachHang.Value = "";
            this.AdvKhachHang.WidthCode = 80;
            this.CboDonVi.FormattingEnabled = true;
            point = new Point(0x66, 0x15);
            this.CboDonVi.Location = point;
            this.CboDonVi.Name = "CboDonVi";
            size = new Size(0x133, 0x15);
            this.CboDonVi.Size = size;
            this.CboDonVi.TabIndex = 0x48;
            this.Label1.AutoSize = true;
            point = new Point(10, 0x18);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x26, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x45;
            this.Label1.Text = "Đơn vị";
            this.TxtDenNgay.Format = DateTimePickerFormat.Short;
            point = new Point(0x142, 0x4a);
            this.TxtDenNgay.Location = point;
            this.TxtDenNgay.Name = "TxtDenNgay";
            size = new Size(0x57, 20);
            this.TxtDenNgay.Size = size;
            this.TxtDenNgay.TabIndex = 0x40;
            this.TxtTuNgay.Format = DateTimePickerFormat.Short;
            point = new Point(0x66, 0x4a);
            this.TxtTuNgay.Location = point;
            this.TxtTuNgay.Name = "TxtTuNgay";
            size = new Size(0x56, 20);
            this.TxtTuNgay.Size = size;
            this.TxtTuNgay.TabIndex = 0x3f;
            DateTime time = new DateTime(0x7d7, 7, 1, 0, 0, 0, 0);
            this.TxtTuNgay.Value = time;
            this.Label13.AutoSize = true;
            point = new Point(10, 0x4d);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x2e, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x41;
            this.Label13.Text = "Từ ng\x00e0y";
            this.Label2.AutoSize = true;
            point = new Point(10, 0x33);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x43, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x44;
            this.Label2.Text = "Số t\x00e0i khoản";
            this.Label3.AutoSize = true;
            point = new Point(0xfe, 0x4d);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x35, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x42;
            this.Label3.Text = "Đến ng\x00e0y";
            this.AdvTaiKhoan.Conditions = "";
            this.AdvTaiKhoan.DefaultValue = "331";
            this.AdvTaiKhoan.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTaiKhoan.KeyFilter = "331";
            point = new Point(0x66, 0x30);
            this.AdvTaiKhoan.Location = point;
            Padding padding = new Padding(0);
            this.AdvTaiKhoan.Margin = padding;
            this.AdvTaiKhoan.Name = "AdvTaiKhoan";
            this.AdvTaiKhoan.OnlyDigit = false;
            this.AdvTaiKhoan.ReadOnly = false;
            size = new Size(0x133, 20);
            this.AdvTaiKhoan.Size = size;
            this.AdvTaiKhoan.TabIndex = 0x49;
            this.AdvTaiKhoan.UpperText = true;
            this.AdvTaiKhoan.Value = "";
            this.AdvTaiKhoan.WithCode = 80;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            size = new Size(0x1b6, 0x110);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.CmdCancel);
            this.Controls.Add(this.CmdOK);
            this.Controls.Add(this.GroupBox1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_RptDoiChieuCongNoPhaiTra";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "BC-KT02";
            this.Text = "DOI CHIEU CONG NO PHAI TRA";
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            this.ResumeLayout(false);
        }

        public void PrintReportMau1()
        {
            clsDMTaiKhoan khoan = new clsDMTaiKhoan();
            clsDMDoiTuong tuong = new clsDMDoiTuong();
            khoan.Load(this.AdvTaiKhoan.Value);
            tuong.Load(this.AdvKhachHang.Value);
            this.Cursor = Cursors.WaitCursor;
            DataTable dataDoiChieuTongHop = this.GetDataDoiChieuTongHop();
            if (dataDoiChieuTongHop.Rows.Count == 0)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Kh\x00f4ng c\x00f3 dữ liệu !", ""));
            }
            else
            {
                double num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieuTongHop.Rows[0]["SoDuNoDauKy"]), 0, modGeneral.TypeOfValue.Nothing)) + Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieuTongHop.Rows[0]["TongSoPhatSinhNo"]), 0, modGeneral.TypeOfValue.Nothing));
                num -= Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieuTongHop.Rows[0]["SoDuCoDauKy"]), 0, modGeneral.TypeOfValue.Nothing)) + Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieuTongHop.Rows[0]["TongSoPhatSinhCo"]), 0, modGeneral.TypeOfValue.Nothing));
                num = Math.Round(num, 0);
                RptDoiChieuCongNoPhaiTraMau1 mau = new RptDoiChieuCongNoPhaiTraMau1();
                try
                {
                    mau.SetDataSource(dataDoiChieuTongHop);
                    mau.Subreports[0].SetDataSource(modGeneral.H_DATACOMPANY);
                    if (modGeneral.H_LANGUAGE == "VIET")
                    {
                        mau.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEVIET, ""));
                    }
                    else
                    {
                        mau.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEANH, ""));
                    }
                    mau.SetParameterValue(1, modGeneral.Tranlated("", "") + modGeneral.H_ADDRESS);
                    mau.SetParameterValue(2, modGeneral.Tranlated("T\x00e0i khoản", "") + ": " + modGeneral.H_ACOUNTTNUMBERVND + " " + modGeneral.Tranlated("Tại", "") + ":" + modGeneral.H_BANK);
                    mau.SetParameterValue(3, modGeneral.Tranlated("Điện thoại", "") + ": " + modGeneral.H_TELEPHONE);
                    mau.SetParameterValue(4, modGeneral.Tranlated("Fax", "") + ": " + modGeneral.H_FAX);
                    mau.SetParameterValue(5, modGeneral.Tranlated("BẢNG ĐỐI CHIẾU C\x00d4NG NỢ", ""));
                    mau.SetParameterValue(6, modGeneral.Tranlated("Từ ng\x00e0y ", "") + ":" + this.TxtTuNgay.Text + " " + modGeneral.Tranlated("đến ng\x00e0y ", "") + " : " + this.TxtDenNgay.Text);
                    mau.SetParameterValue(7, modGeneral.Tranlated("STT", ""));
                    mau.SetParameterValue(8, modGeneral.Tranlated("Nh\x00e0 cung cấp ", "") + ": ");
                    mau.SetParameterValue(9, modGeneral.Tranlated("Ng\x00e0y", ""));
                    if (this.OptInChungTu.Checked)
                    {
                        mau.SetParameterValue(10, modGeneral.Tranlated("Số chứng từ", ""));
                    }
                    else
                    {
                        mau.SetParameterValue(10, modGeneral.Tranlated("Số h\x00f3a đơn", ""));
                    }
                    mau.SetParameterValue(11, modGeneral.Tranlated("Diễn giải", ""));
                    mau.SetParameterValue(12, modGeneral.Tranlated("Th\x00e0nh tiền", ""));
                    mau.SetParameterValue(13, modGeneral.Tranlated("Thanh to\x00e1n", ""));
                    mau.SetParameterValue(14, modGeneral.Tranlated("Cộng ph\x00e1t sinh", "") + ":");
                    mau.SetParameterValue(15, Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(khoan.SoTaiKhoan.Trim() + ". ", Interaction.IIf(modGeneral.H_LANGUAGE == "VIET", khoan.TenViet, khoan.TenAnh)));
                    mau.SetParameterValue(0x10, Interaction.IIf(modGeneral.H_LANGUAGE == "VIET", tuong.TenViet, tuong.TenAnh).ToString().ToUpper());
                    mau.SetParameterValue(0x11, modGeneral.Tranlated("Số dư đầu ng\x00e0y ", "") + this.TxtTuNgay.Text);
                    mau.SetParameterValue(0x12, modGeneral.Tranlated("Số dư cuối ng\x00e0y ", "") + this.TxtDenNgay.Text);
                    mau.SetParameterValue(0x13, modGeneral.Tranlated("Ng\x00e0y ...... th\x00e1ng ...... năm ............", ""));
                    mau.SetParameterValue(20, modGeneral.Tranlated("Lập biểu", ""));
                    mau.SetParameterValue(0x15, modGeneral.Tranlated("X\x00e1c nhận của kh\x00e1ch h\x00e0ng", ""));
                    mau.SetParameterValue(0x16, modGeneral.Tranlated("Đề nghị qu\x00fd đơn vị vui l\x00f2ng kiểm tra, x\x00e1c nhận c\x00f4ng nợ v\x00e0 gửi về cho c\x00f4ng ty ch\x00fang t\x00f4i theo địa chỉ tr\x00ean.", ""));
                    mau.SetParameterValue(0x17, modGeneral.Tranlated("Bằng chữ: ", "") + ReportModule.Number2Char(Conversions.ToString(num), ".") + " " + modGeneral.Tranlated("đồng", ""));
                    mau.SetParameterValue(0x18, modGeneral.Tranlated("mẫu số 1", ""));
                    mau.SetParameterValue(0x19, modGeneral.Tranlated("Người nhận", "") + ": " + this.TxtNguoiNhan.Text);
                    mau.SetParameterValue(0x1a, modGeneral.Tranlated("Fax", "") + ": " + this.TxtFax.Text);
                    mau.SetParameterValue(0x1b, modGeneral.Tranlated("Điện thoại", "") + ": " + this.TxtDienThoai.Text);
                    MyProject.Forms.Frm_ViewReport.ReportViewer.ReportSource = mau;
                    MyProject.Forms.Frm_ViewReport.ReportViewer.DisplayGroupTree = false;
                    this.Cursor = Cursors.Default;
                    MyProject.Forms.Frm_ViewReport.ShowDialog();
                }
                catch (Exception exception1)
                {
                    ProjectData.SetProjectError(exception1);
                    Exception exception = exception1;
                    MessageBox.Show(exception.Message.ToString());
                    ProjectData.ClearProjectError();
                }
            }
        }

        public void PrintReportMau2()
        {
            clsDMTaiKhoan khoan = new clsDMTaiKhoan();
            clsDMDoiTuong tuong = new clsDMDoiTuong();
            khoan.Load(this.AdvTaiKhoan.Value);
            tuong.Load(this.AdvKhachHang.Value);
            this.Cursor = Cursors.WaitCursor;
            DataTable dataDoiChieu = this.GetDataDoiChieu();
            if (dataDoiChieu.Rows.Count == 0)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Kh\x00f4ng c\x00f3 dữ liệu !", ""));
            }
            else
            {
                double num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieu.Rows[0]["SoDuNoDauKy"]), 0, modGeneral.TypeOfValue.Nothing)) + Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieu.Rows[0]["TongSoPhatSinhNo"]), 0, modGeneral.TypeOfValue.Nothing));
                num -= Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieu.Rows[0]["SoDuCoDauKy"]), 0, modGeneral.TypeOfValue.Nothing)) + Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieu.Rows[0]["TongSoPhatSinhCo"]), 0, modGeneral.TypeOfValue.Nothing));
                RptDoiChieuCongNoPhaiTra tra = new RptDoiChieuCongNoPhaiTra();
                try
                {
                    tra.SetDataSource(dataDoiChieu);
                    tra.Subreports[0].SetDataSource(modGeneral.H_DATACOMPANY);
                    if (modGeneral.H_LANGUAGE == "VIET")
                    {
                        tra.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEVIET, ""));
                    }
                    else
                    {
                        tra.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEANH, ""));
                    }
                    tra.SetParameterValue(1, modGeneral.Tranlated("", "") + modGeneral.H_ADDRESS);
                    tra.SetParameterValue(2, modGeneral.Tranlated("T\x00e0i khoản", "") + ": " + modGeneral.H_ACOUNTTNUMBERVND + " " + modGeneral.Tranlated("Tại", "") + ":" + modGeneral.H_BANK);
                    tra.SetParameterValue(3, modGeneral.Tranlated("Điện thoại", "") + ": " + modGeneral.H_TELEPHONE);
                    tra.SetParameterValue(4, modGeneral.Tranlated("Fax", "") + ": " + modGeneral.H_FAX);
                    tra.SetParameterValue(5, modGeneral.Tranlated("BẢNG ĐỐI CHIẾU C\x00d4NG NỢ", ""));
                    tra.SetParameterValue(6, modGeneral.Tranlated("Từ ng\x00e0y ", "") + ":" + this.TxtTuNgay.Text + " " + modGeneral.Tranlated("đến ng\x00e0y ", "") + " : " + this.TxtDenNgay.Text);
                    tra.SetParameterValue(7, modGeneral.Tranlated("T\x00e0i khoản", "") + ": ");
                    tra.SetParameterValue(8, modGeneral.Tranlated("Nh\x00e0 cung cấp ", "") + ": ");
                    tra.SetParameterValue(9, modGeneral.Tranlated("Ng\x00e0y", ""));
                    if (this.OptInChungTu.Checked)
                    {
                        tra.SetParameterValue(10, modGeneral.Tranlated("Số chứng từ", ""));
                    }
                    else
                    {
                        tra.SetParameterValue(10, modGeneral.Tranlated("Số h\x00f3a đơn", ""));
                    }
                    tra.SetParameterValue(11, modGeneral.Tranlated("H\x00e0ng h\x00f3a", ""));
                    tra.SetParameterValue(12, modGeneral.Tranlated("ĐVT", ""));
                    tra.SetParameterValue(13, modGeneral.Tranlated("Số lượng", ""));
                    tra.SetParameterValue(14, modGeneral.Tranlated("Đơn gi\x00e1", ""));
                    tra.SetParameterValue(15, modGeneral.Tranlated("Tiền h\x00e0ng", ""));
                    tra.SetParameterValue(0x10, modGeneral.Tranlated("Chiết khấu", ""));
                    tra.SetParameterValue(0x11, modGeneral.Tranlated("Thuế", ""));
                    tra.SetParameterValue(0x12, modGeneral.Tranlated("Tổng cộng", ""));
                    tra.SetParameterValue(0x13, modGeneral.Tranlated("Thanh to\x00e1n", ""));
                    tra.SetParameterValue(20, modGeneral.Tranlated("Ph\x00e1t sinh nợ", ""));
                    tra.SetParameterValue(0x15, modGeneral.Tranlated("Ph\x00e1t sinh c\x00f3", ""));
                    tra.SetParameterValue(0x16, modGeneral.Tranlated("Ng\x00e0y ...... th\x00e1ng ...... năm ............", ""));
                    tra.SetParameterValue(0x17, modGeneral.Tranlated("Lập biểu", ""));
                    tra.SetParameterValue(0x18, modGeneral.Tranlated("Cộng ph\x00e1t sinh", "") + ":");
                    tra.SetParameterValue(0x19, modGeneral.Tranlated("X\x00e1c nhận của kh\x00e1ch h\x00e0ng", ""));
                    tra.SetParameterValue(0x1a, Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(khoan.SoTaiKhoan.Trim() + ". ", Interaction.IIf(modGeneral.H_LANGUAGE == "VIET", khoan.TenViet, khoan.TenAnh)));
                    tra.SetParameterValue(0x1b, Interaction.IIf(modGeneral.H_LANGUAGE == "VIET", tuong.TenViet, tuong.TenAnh).ToString().ToUpper());
                    tra.SetParameterValue(0x1c, modGeneral.Tranlated("Số dư đầu ng\x00e0y ", "") + this.TxtTuNgay.Text);
                    tra.SetParameterValue(0x1d, modGeneral.Tranlated("Số dư cuối ng\x00e0y ", "") + this.TxtDenNgay.Text);
                    tra.SetParameterValue(30, modGeneral.Tranlated("Đề nghị qu\x00fd đơn vị vui l\x00f2ng kiểm tra, x\x00e1c nhận c\x00f4ng nợ v\x00e0 gửi về cho c\x00f4ng ty ch\x00fang t\x00f4i theo địa chỉ tr\x00ean.", ""));
                    tra.SetParameterValue(0x1f, modGeneral.Tranlated("Bằng chữ: ", "") + ReportModule.Number2Char(Conversions.ToString(num), ".") + " " + modGeneral.Tranlated("đồng", ""));
                    tra.SetParameterValue(0x20, modGeneral.Tranlated("mẫu số 2", ""));
                    tra.SetParameterValue(0x21, modGeneral.Tranlated("Người nhận", "") + ": " + this.TxtNguoiNhan.Text);
                    tra.SetParameterValue(0x22, modGeneral.Tranlated("Fax", "") + ": " + this.TxtFax.Text);
                    tra.SetParameterValue(0x23, modGeneral.Tranlated("Điện thoại", "") + ": " + this.TxtDienThoai.Text);
                    MyProject.Forms.Frm_ViewReport.ReportViewer.ReportSource = tra;
                    MyProject.Forms.Frm_ViewReport.ReportViewer.DisplayGroupTree = false;
                    this.Cursor = Cursors.Default;
                    MyProject.Forms.Frm_ViewReport.ShowDialog();
                }
                catch (Exception exception1)
                {
                    ProjectData.SetProjectError(exception1);
                    Exception exception = exception1;
                    MessageBox.Show(exception.Message.ToString());
                    ProjectData.ClearProjectError();
                }
            }
        }

        public void PrintReportMau3()
        {
            double num = 0.0;
            clsDMTaiKhoan khoan = new clsDMTaiKhoan();
            clsDMDoiTuong tuong = new clsDMDoiTuong();
            khoan.Load(this.AdvTaiKhoan.Value);
            tuong.Load(this.AdvKhachHang.Value);
            this.Cursor = Cursors.WaitCursor;
            DataTable dataDoiChieu = this.GetDataDoiChieu();
            if (dataDoiChieu.Rows.Count == 0)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Kh\x00f4ng c\x00f3 dữ liệu !", ""));
            }
            else
            {
                RptDoiChieuCongNoPhaiTraMau3 mau = new RptDoiChieuCongNoPhaiTraMau3();
                try
                {
                    num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieu.Rows[0]["SoDuNoDauKy"]), 0, modGeneral.TypeOfValue.Nothing)) + Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieu.Rows[0]["TongSoPhatSinhNo"]), 0, modGeneral.TypeOfValue.Nothing));
                    num -= Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieu.Rows[0]["SoDuCoDauKy"]), 0, modGeneral.TypeOfValue.Nothing)) + Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(dataDoiChieu.Rows[0]["TongSoPhatSinhCo"]), 0, modGeneral.TypeOfValue.Nothing));
                    mau.SetDataSource(dataDoiChieu);
                    mau.Subreports[0].SetDataSource(modGeneral.H_DATACOMPANY);
                    if (modGeneral.H_LANGUAGE == "VIET")
                    {
                        mau.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEVIET, ""));
                    }
                    else
                    {
                        mau.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEANH, ""));
                    }
                    mau.SetParameterValue(1, modGeneral.Tranlated("", "") + modGeneral.H_ADDRESS);
                    mau.SetParameterValue(2, modGeneral.Tranlated("T\x00e0i khoản", "") + ": " + modGeneral.H_ACOUNTTNUMBERVND + " " + modGeneral.Tranlated("Tại", "") + ":" + modGeneral.H_BANK);
                    mau.SetParameterValue(3, modGeneral.Tranlated("Điện thoại", "") + ": " + modGeneral.H_TELEPHONE);
                    mau.SetParameterValue(4, modGeneral.Tranlated("Fax", "") + ": " + modGeneral.H_FAX);
                    mau.SetParameterValue(5, modGeneral.Tranlated("BẢNG ĐỐI CHIẾU C\x00d4NG NỢ", ""));
                    mau.SetParameterValue(6, modGeneral.Tranlated("Từ ng\x00e0y ", "") + ":" + this.TxtTuNgay.Text + " " + modGeneral.Tranlated("đến ng\x00e0y ", "") + " : " + this.TxtDenNgay.Text);
                    mau.SetParameterValue(7, modGeneral.Tranlated("T\x00e0i khoản", "") + ": ");
                    mau.SetParameterValue(8, modGeneral.Tranlated("Nh\x00e0 cung cấp ", "") + ": ");
                    mau.SetParameterValue(9, modGeneral.Tranlated("Ng\x00e0y", ""));
                    if (this.OptInChungTu.Checked)
                    {
                        mau.SetParameterValue(10, modGeneral.Tranlated("Số chứng từ", ""));
                    }
                    else
                    {
                        mau.SetParameterValue(10, modGeneral.Tranlated("Số h\x00f3a đơn", ""));
                    }
                    mau.SetParameterValue(11, modGeneral.Tranlated("H\x00e0ng h\x00f3a", ""));
                    mau.SetParameterValue(12, modGeneral.Tranlated("ĐVT", ""));
                    mau.SetParameterValue(13, modGeneral.Tranlated("Số lượng", ""));
                    mau.SetParameterValue(14, modGeneral.Tranlated("Đơn gi\x00e1", ""));
                    mau.SetParameterValue(15, modGeneral.Tranlated("Tổng cộng", ""));
                    mau.SetParameterValue(0x10, modGeneral.Tranlated("Thanh to\x00e1n", ""));
                    mau.SetParameterValue(0x11, modGeneral.Tranlated("Người nhận", "") + ": " + this.TxtNguoiNhan.Text);
                    mau.SetParameterValue(0x12, modGeneral.Tranlated("Fax", "") + ": " + this.TxtFax.Text);
                    mau.SetParameterValue(0x13, modGeneral.Tranlated("Điện thoại", "") + ": " + this.TxtDienThoai.Text);
                    mau.SetParameterValue(20, modGeneral.Tranlated("Ph\x00e1t sinh nợ", ""));
                    mau.SetParameterValue(0x15, modGeneral.Tranlated("Ph\x00e1t sinh c\x00f3", ""));
                    mau.SetParameterValue(0x16, modGeneral.Tranlated("Ng\x00e0y ...... th\x00e1ng ...... năm ............", ""));
                    mau.SetParameterValue(0x17, modGeneral.Tranlated("Lập biểu", ""));
                    mau.SetParameterValue(0x18, modGeneral.Tranlated("Cộng ph\x00e1t sinh", "") + ":");
                    mau.SetParameterValue(0x19, modGeneral.Tranlated("X\x00e1c nhận của kh\x00e1ch h\x00e0ng", ""));
                    mau.SetParameterValue(0x1a, Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(khoan.SoTaiKhoan.Trim() + ". ", Interaction.IIf(modGeneral.H_LANGUAGE == "VIET", khoan.TenViet, khoan.TenAnh)));
                    mau.SetParameterValue(0x1b, Interaction.IIf(modGeneral.H_LANGUAGE == "VIET", tuong.TenViet, tuong.TenAnh).ToString().ToUpper());
                    mau.SetParameterValue(0x1c, modGeneral.Tranlated("Số dư đầu ng\x00e0y ", "") + this.TxtTuNgay.Text);
                    mau.SetParameterValue(0x1d, modGeneral.Tranlated("Số dư cuối ng\x00e0y ", "") + this.TxtDenNgay.Text);
                    mau.SetParameterValue(30, modGeneral.Tranlated("Đề nghị qu\x00fd đơn vị vui l\x00f2ng kiểm tra, x\x00e1c nhận c\x00f4ng nợ v\x00e0 gửi về cho c\x00f4ng ty ch\x00fang t\x00f4i theo địa chỉ tr\x00ean.", ""));
                    mau.SetParameterValue(0x1f, modGeneral.Tranlated("Bằng chữ", "") + ": " + ReportModule.Number2Char(Conversions.ToString(num), ".") + " " + modGeneral.Tranlated("đồng", ""));
                    mau.SetParameterValue(0x20, modGeneral.Tranlated("mẫu số 3", ""));
                    MyProject.Forms.Frm_ViewReport.ReportViewer.ReportSource = mau;
                    MyProject.Forms.Frm_ViewReport.ReportViewer.DisplayGroupTree = false;
                    this.Cursor = Cursors.Default;
                    MyProject.Forms.Frm_ViewReport.ShowDialog();
                }
                catch (Exception exception1)
                {
                    ProjectData.SetProjectError(exception1);
                    Exception exception = exception1;
                    MessageBox.Show(exception.Message.ToString());
                    ProjectData.ClearProjectError();
                }
            }
        }

        private void TxtTuNgay_LostFocus(object sender, EventArgs e)
        {
            if (LVYModule.sRight(this.TxtTuNgay.Text, 7) != LVYModule.sRight(this.TxtDenNgay.Text, 7))
            {
                this.TxtDenNgay.Text = DateTime.DaysInMonth(Conversions.ToInteger(LVYModule.sRight(this.TxtTuNgay.Text, 4)), Conversions.ToInteger(LVYModule.sMid(this.TxtTuNgay.Text, 4, 2))).ToString() + "/" + LVYModule.sRight(this.TxtTuNgay.Text, 7);
            }
        }

        internal virtual ADVObjects AdvKhachHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvKhachHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                ADVObjects.ValueChangedEventHandler handler = new ADVObjects.ValueChangedEventHandler(this.AdvKhachHang_ValueChanged);
                if (this._AdvKhachHang != null)
                {
                    this._AdvKhachHang.ValueChanged -= handler;
                }
                this._AdvKhachHang = value;
                if (this._AdvKhachHang != null)
                {
                    this._AdvKhachHang.ValueChanged += handler;
                }
            }
        }

        internal virtual ADVAccount AdvTaiKhoan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTaiKhoan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTaiKhoan = value;
            }
        }

        internal virtual ComboBox CboDonVi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboDonVi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboDonVi = value;
            }
        }

        internal virtual ComboBox CboMauBaoCao
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboMauBaoCao;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboMauBaoCao = value;
            }
        }

        internal virtual Button CmdCancel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdCancel_Click);
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click -= handler;
                }
                this._CmdCancel = value;
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click += handler;
                }
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label16
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label16;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label16 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual RadioButton OptInChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._OptInChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._OptInChungTu = value;
            }
        }

        internal virtual RadioButton OptInHoaDon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._OptInHoaDon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._OptInHoaDon = value;
            }
        }

        internal virtual DateTimePicker TxtDenNgay
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDenNgay;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDenNgay = value;
            }
        }

        internal virtual TextBox TxtDienThoai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDienThoai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDienThoai = value;
            }
        }

        internal virtual TextBox TxtFax
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtFax;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtFax = value;
            }
        }

        internal virtual TextBox TxtNguoiNhan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNguoiNhan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNguoiNhan = value;
            }
        }

        internal virtual DateTimePicker TxtTuNgay
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTuNgay;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtTuNgay_LostFocus);
                if (this._TxtTuNgay != null)
                {
                    this._TxtTuNgay.LostFocus -= handler;
                }
                this._TxtTuNgay = value;
                if (this._TxtTuNgay != null)
                {
                    this._TxtTuNgay.LostFocus += handler;
                }
            }
        }
    }
}

